package jp.co.hcs.attendancemanagement.data.dao.impl;

import jp.co.hcs.attendancemanagement.AMLogger;

import org.apache.log4j.Logger;

import com.ibatis.sqlmap.client.SqlMapClient;

public class BaseDAOImpl {

	private static Logger log = AMLogger.getLogger(BaseDAOImpl.class.getName());
	protected SqlMapClient sqlMapClient;

//	static {
//		try {
//			log.debug("Attempting to initialize SqlMap");
//			String resource = "SqlMapConfig.xml";
//			Reader reader = Resources.getResourceAsReader(resource);
//			sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(reader);
//			log.debug("Initialized SqlMap");
//		} catch (Exception e) {
//			log.error("Error intializing BaseIbatisDao ", e);
//			e.printStackTrace();
//			throw new RuntimeException(
//					"Error initializing BaseIbatisDao class. Cause: " + e);
//		}
//	}

	protected BaseDAOImpl() {
	}

	public SqlMapClient getSqlMapClient() {
		return sqlMapClient;
	}

	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}
}
